var imgempty	= 'images/dice_empty.png';
var imgvolon	= 'images/vol-on.png';
var imgvoloff	= 'images/vol-off.png';

var rules = false;

function showrules() {

if (rules == false) {
rules = true;
$('#gamegrids').fadeTo(400, 0);
$('#rules').fadeTo(400, 1);
    document.getElementById('rules').style.visibility='visible';
    document.getElementById('rules').style.display='block';
    document.getElementById('gamegrids').style.visibility='hidden';
    document.getElementById('gamegrids').style.display='none';
    document.getElementById('rulesinput').value='Back to game';
}
else {
rules = false;	
$('#gamegrids').fadeTo(400, 1);
$('#rules').fadeTo(400, 0);
    document.getElementById('gamegrids').style.visibility='visible';
    document.getElementById('gamegrids').style.display='block';
    document.getElementById('rules').style.visibility='hidden';
    document.getElementById('rules').style.display='none';
    document.getElementById('rulesinput').value='Show rules';
 }
}	
